﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Filelister
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
        {
            string[] strfile;
            string[] strfile2;
            strfile2 = openFileDialog1.SafeFileNames;
            strfile = openFileDialog1.FileNames;
            richTextBox1.Lines = strfile;
            richTextBox2.Lines = strfile2;
            richTextBox1.Update(); 
            richTextBox2.Update();
          //  for (int i = 0; i < strfile.Length; i++)
          //  {
          //      richTextBox1.Lines = strfile[i];
          //      richTextBox1.Update();
          //}
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
        }

        private void button1_Click_1(object sender, EventArgs e)
        {
            openFileDialog1.ShowDialog();
        }
    }
}
